export interface ToggleControlDataType {
  value: string
  label: string
  title?: string
}

function isActiveToggle(data: ToggleControlDataType, value: string | string[]): boolean {
  return ((value as string[]) || []).findIndex((item) => item === data.value) !== -1
}

function isActiveAllToggle(value: string | string[]): boolean {
  return !value || value?.length === 0
}

export {isActiveToggle, isActiveAllToggle}
